import { AtFloatLayout } from 'taro-ui';
import './index.scss';

export default function ({
  title = '',
  show,
  scrollY = false,
  className = '',
  onClose = () => {},
  children,
}) {
  return (
    <AtFloatLayout
      isOpened={show}
      scrollY={scrollY}
      className={`modal-component ${className}`}
      title={title}
      onClose={onClose}
    >
      {children}
    </AtFloatLayout>
  );
}
